﻿using System;
using System.Collections.Generic;
using System.Text;

namespace BlueLotus7
{
    partial class Validator
    {
        static public bool IsSignlessIntegral(string numberString)
        {
            if (string.IsNullOrWhiteSpace(numberString))
                return false;
            for (int i = 0; i < numberString.Length; i++)
            {
                if (numberString[i] > '9' || numberString[i] < '0')
                    return false;
            }
            return true;
        }

        public static bool IsNumber(char charset)
        {
            if (charset < '0' || charset > '9')
                return false;
            return true;
        }

        public static bool ContainsNumberCharset(string stringToCheck)
        {
            if (string.IsNullOrWhiteSpace(stringToCheck))
                return false;
            for (int i = 0; i < stringToCheck.Length; i++)
            {
                if (stringToCheck[i] <= '9' && stringToCheck[i] >= '0')
                    return true;
            }
            return false;
        }
    }
}
